<?php
require_once 'header.php';
require_once 'admin_comm.php';

$fun_list = admin_fun_module_child();

$info = admin_fun_find_admin($cookie['id']);

?>
		<script type="text/javascript" charset="utf-8">
			loader.file({
				skincss:['top'],
				js:['main']
			});

			window.onload = function() {
				main_object.top_menu_init({
					own:$('#top_menu')
				})
				var scroll_boj = function (parm){
					//固定的宽度对象
					this.w_obj = parm.obj || $('.sc_navbox ul');
					//左按钮
					this.left_obj = parm.left_obj;
					//右按钮
					this.right_obj = parm.right_obj;
					this.stop;
					this.stop2;
					this.rand_width = parm.rand_width || $('.sc_navbox');

					var _this = this;
					/****method*****/
					this.init = function (){
						_this.rand_width.scrollLeft(980);
						this.left_obj.bind("mousedown",function (){
							_this.scroll_("mousedown",'left');
						})
						this.left_obj.bind("mouseup mouseleave",function (){
							_this.scroll_("mouseup",'left');
						})
						this.right_obj.bind("mousedown",function (){
							_this.scroll_("mousedown",'right');
						})
						this.right_obj.bind("mouseup mouseleave",function (){
							_this.scroll_("mouseup",'right');
						})
					}
					this.scroll_ = function (flag,_this1){
						if(typeof flag == 'undefined'){
							return false;
						}
						if(flag == 'mousedown'){
								this.stop = setInterval(function() {
									var socrllwidth = _this.rand_width.scrollLeft();
									if(_this1 == 'left') socrllwidth -=3;
									if(_this1 == 'right') socrllwidth +=3;
									if(socrllwidth<0){
										socrllwidth = 0;
										clearInterval(this.stop);
									}
									if(socrllwidth>=_this.w_obj.width()){
										socrllwidth = _this.w_obj;
										clearInterval(this.stop);
									}
									_this.rand_width.scrollLeft(socrllwidth);
								}, 20);

						}
						if(flag == 'mouseup' ){
							clearTimeout(this.stop2);
							clearInterval(this.stop);
							return ;
						}
					}
					this.init();
				}


				var scroll = new scroll_boj({
					obj:$('.sc_navbox ul'),
					left_obj:$('.s_leftbtn'),
					right_obj:$('.s_rightbtn'),
					rand_width:$('.sc_navbox')
				});
			}
		</script>
	</head>

	<body>
		<div class="top_nav"><div class="logo">
		<img src="/static/admin/img/logo.jpg" alt="">
		</div>
			<div class="top_nav_box">
				<div class="top_nav_info">
					<span>

					<a href="/handle.php?h=admin/quit" style="padding-right: 10px;" target="_parent" onClick="return confirm('确定退出？');">退出</a></span>
					今天是:<?php echo date('Y年m月d日');?>  |  欢迎  <b><?php echo $cookie['name'];?></b></div>
				<div class="top_nav_main" id="top_menu">
					<span class="s_leftbtn s_l_btn"></span>
					<span class="s_rightbtn s_r_btn"></span>
					<div class="sc_navbox">
					<ul>
					<?php
					if($fun_list){
						foreach($fun_list as $k=>$v){
							if($k == 1 && $cookie['group'] == 7){
								echo '<li><a href="http://fenxiang.tcxqt.com" target="_blank">学习分享</a></li>';
							}
							if(!$array_module[$v['id']]){
								continue;
							}
					?>
					<li><a href="/admin/left?id=<?php echo $v['id'];?>&cookuid=<?php echo $cookie['id'];?>" target="leftFrame"><?php echo $v['content'];?></a></li>
					<?php
						}
					}
					?>
					</ul>
					</div>
				</div>
			</div>

		</div>
	</body>
</html>
